
package com.uuah.server.api.transport.service;

import com.uuah.server.api.component.service.IService;
import com.uuah.server.api.config.registry.IServiceDescriptor;
import com.uuah.server.api.endpoint.IEndpointURIBuilder;
import com.uuah.server.api.endpoint.IUuahEndpoint;
import com.uuah.server.api.session.ISessionHandler;
import com.uuah.server.api.transformer.IBaseTransformer;
import com.uuah.server.api.transport.IConnector;
import com.uuah.server.api.transport.IMessageAdapter;
import com.uuah.server.api.transport.IMessageDispatcherFactory;
import com.uuah.server.api.transport.IMessageReceiver;
import com.uuah.server.exception.AbstractUuahServerException;
import com.uuah.server.exception.transport.service.TransportFactoryException;
import com.uuah.server.exception.transport.service.TransportServiceException;

/**
 *   <code>TransportServiceDescriptor</code> describes the necessary information
 * for creating a connector from a service descriptor.
 *
 * <p>update record:updator，update time，update content and version</p>
 * @author <a href="jonny_quan@hotmail.com">jonny</a>
 * @date 2009 2009-3-27 上午12:10:31
 * @version 1.0.0
 */
public interface ITransportServiceDescriptor extends IServiceDescriptor {
	public static final String OSGI_HEADER_TRANSPORT = "Uuah-Transport";

	public IMessageAdapter createMessageAdapter(Object message)
			throws TransportServiceException;

	public ISessionHandler createSessionHandler()
			throws TransportServiceException;

	public IMessageReceiver createMessageReceiver(IConnector connector,
			IService service, IUuahEndpoint endpoint) throws AbstractUuahServerException;

	public IMessageReceiver createMessageReceiver(IConnector connector,
			IService service, IUuahEndpoint endpoint, Object[] args)
			throws AbstractUuahServerException;

	public IMessageDispatcherFactory createDispatcherFactory()
			throws TransportServiceException;

	public IConnector createConnector() throws TransportServiceException;

	public IBaseTransformer createRequestTransformer()
			throws TransportFactoryException;

	public IBaseTransformer createResponseTransformer()
			throws TransportFactoryException;

	public IEndpointURIBuilder createEndpointBuilder()
			throws TransportFactoryException;

}
